<?php
namespace App\Service;
use Illuminate\Support\Facades\Validator;
class Validate{
    /**
     * User: YKY
     * DateTime: 2022/11/15 10:55
     * @param $addGoodsdata
     * @param $field
     * @param $msg
     * @return string
     * 验证器
     */
    public static function store($addGoodsdata,$field,$msg)
    {
        $validator = Validator::make($addGoodsdata, $field,$msg);
        if ($validator->fails()) {
            return $validator->errors()->first();
        }
    }
}
